home *** CD-ROM | disk | FTP | other *** search
- FILEC Version 1.00
- By Mike Morearty
-
-
-
- INTRODUCTION
- ------------
-
- FILEC stands for Filename Completion. This program provides
- filename completion similar to that done by some versions of the
- Unix C Shell (also called "Tenex-style" completion).
-
- The purpose of filename completion is so that the user doesn't
- have to type in long filenames when the first few characters
- would be enough to distinguish a filename from all other files in
- the directory. For example, suppose a directory contains only
- the following files:
-
- A B C LONGFILE.NAM
-
- To access LONGFILE.NAM (for example, to see its contents with the
- TYPE command), the user normally has to type the entire filename.
- However, with filename completion, the user need only enter
-
- TYPE L_
-
- and then hit the Escape key. (The underline represents the
- cursor.) Since there is only one filename in the directory that
- begins with the letter L, the rest of the filename is filled in
- automatically, as if the user had typed it. Now, the command
- lines reads
-
- TYPE LONGFILE.NAM_
-
- and the user can hit Enter.
-
-
-
- STARTING FILEC
- --------------
-
- To install Filec, just type FILEC and press Enter. The program
- will print the version number and say that it is now installed.
- If the program was already installed, it will say so. Note that
- the message can be suppressed by redirecting the output to the
- null device, i.e.
-
- FILEC >NUL
-
- You may want to put this line in your AUTOEXEC.BAT file. Also,
- note that if you are using the public domain Ced program, Filec
- must be installed AFTER Ced is installed.
-
- To change the keys used to invoke Filec, read the "Configuration"
- section below.
-
-
-
- TOO FEW OR TOO MANY MATCHING FILES
- ----------------------------------
-
- As described in the Introduction, the Escape key is used to
- complete the filename of which the first few characters have been
- typed. What if there is more than one filename that begins with
- the characters that have been typed? In that case, as many
- characters as possible are filled in on the command line, and
- then a short beep is emitted. For example, if in addition to the
- files in the original example (A, B, C, and LONGFILE.NAM), there
- is also a file LONGNAME in the current directory, then after
- typing "TYPE L" and pressing Escape the command line would be
- filled in with
-
- TYPE LONG_
-
- and then FILEC would emit a short beep to let you know that a
- complete filename had not been filled in. A beep is also emitted
- if no files match the characters that have been typed.
-
-
-
- THE DIRECTORY KEY, ^D
- ---------------------
-
- Sometimes you have begun typing a long command, and you hit
- Escape only to be greeted by a beep. This either means that no
- files match the characters typed so far, or that more than one
- file matches (see above section). If you want to get a list of
- files that match the characters typed so far, you can do so at
- any time by typing ^D (control-D). A list of the matching files
- will be displayed, and then the command line will be redrawn.
- (Note that if you have CED installed and you backspace after
- getting a directory, you may get some funny behavior on the
- screen; there is no way to avoid this, but no harm is done.)
-
- Using the example in the above section, the screen shows
-
- A>TYPE L_
-
- and you hit Escape. Now the screen shows
-
- A>TYPE LONG_
-
- and a beep has sounded. Now you hit ^D. The screen now shows
-
- A>TYPE LONG
- LONGFILE.NAM LONGNAME
- A>TYPE LONG_
-
- You can now hit an F or an N and then hit Escape again, and the
- appropriate filename will be filled in.
-
-
-
- THE DISABLE KEY, ALT-F10
- ------------------------
-
- Suppose you bring up SideKick with Ctrl-Alt (or any other memory-
- resident program), and then when you are done using it and hit
- Escape, all you get is a beep. This means that FILEC doesn't
- know you are not at the DOS prompt, so it is trying to find a
- filename at the cursor position but doesn't see one. To get back
- to the system prompt, type ALT-F10, and then hit Escape again.
- ALT-F10 temporarily disables any filename completion. If you
- want to re-enable filename completion, type ALT-F10 a second
- time.
-
- Note that filename completion is automatically turned on again
- after you hit Return, so ALT-F10 only affects the current line of
- input.
-
- To avoid conflicts with programs such as SideKick, you can change
- FILEC's filename completion keys. See "Installation."
-
-
-
- IGNORING CERTAIN EXTENSIONS
- ---------------------------
-
- There are certain filenames that you seldom access directly on
- the command line, and these are almost always recognizable by
- their extension. For example, files that end in .BAK are almost
- never accessed (because they are backup files). You may have
- several files in a directory with the same base name but
- different extensions; for example, if you are a programmer, you
- may have FILE.C, FILE.BAK, FILE.OBJ, and FILE.EXE all the same
- directory. In this case, FILE.C is the only one whose name you
- type frequently.
-
- To get around this difficulty, FILEC ignores filenames that have
- certain extensions. All files that have the extension EXE, COM,
- BAK, OBJ, or $$$ are ignored when looking for a matching
- filename.
-
- There is an exception: if, for example, FILE.EXE is the ONLY file
- that matches the letters typed, then that filename will be filled
- in, even though it has one of the disallowed extensions.
-
- Also, you can easily change the list of extensions that are
- ignored. To do this, BEFORE installing FILEC, set the
- environment variable FIGNORE. For example:
-
- SET FIGNORE=.exe .com .bak .ovr .hex
-
- Upper and lower case distinctions are not important. Wildcards
- are not allowed.
-
-
-
- CONFIGURATION
- -------------
-
- If your version of DOS does not erase the line when you type ^U,
- you should definitely read this section. Others may want to read
- it as well.
-
- You may, for some reason, want to change the keystrokes that are
- used to invoke Filec. For example, the default keystrokes
- (Escape and ^D) might conflict with a memory-resident program you
- use, or with DOS itself. (Normally, Escape cancels the text that
- has been entered so far on the DOS command line.)
-
- To change these defaults, you can use the configuration program,
- FILECKEY. (Just type "Fileckey"; the program is self-
- explanatory.) Not only will this program allow you to change the
- Filename Completion key (normally Escape) and the Directory key
- (normally ^D), but it will also let you assign a "Change From"
- key and a "Change To" key. For example, you can assign ^U to the
- "Change From" key, and Escape to the "Change To" key. Then,
- whenever you type ^U at the command line, DOS will think you
- typed Escape. This is useful if your version of DOS recognizes
- no key other than Escape to erase the currently entered text, and
- yet you want to use Escape for Filec.
-
- Note that this key translation will only be done while you are
- typing on the command line -- it will not be done when you are
- running a program. Also, you could theoretically use this
- feature for some other purpose than assigning a cancel-line key.
-
- You can also specify a "Disable" key with the FILECKEY program.
- This key, which is ALT-F10 by default, allows you to temporarily
- disable filename completion. This may be necessary when certain
- pop-up programs are run which use the same keys that FILEC uses
- (such as recent versions of SideKick; older versions do not have
- this problem). A better solution, if there is a program you use
- frequently which conflicts with FILEC, is to change the FILEC key
- assignments so that they do not conflict. One good possibility
- is to assign Tab to the Replace key and Shift-Tab to the
- Directory key. Or you could make F1 the Replace key and F2 the
- directory key, although these choices probably conflict with many
- pop-up programs.
-
-
-
- OTHER CONSIDERATIONS
- --------------------
-
- To find out what characters the user has typed so far, Filec
- reads the screen directly. This means it will not work on
- computers that do not use a video memory system similar to that
- of the IBM. (This will be a problem for very few users.) Also, it
- starts at the character immediately before the cursor and moves
- back from there until it reaches a character that is not allowed
- in filenames; therefore, if the user types, for example, "CD\",
- and then hits Escape, Filec will beep, because it will be looking
- for a subdirectory named "CD". Instead the user must type
- "CD \".
-
- If you have a subdirectory called \SUBDIR, and you type, for
- example, "TYPE \SUBDIR" and then hit ^D, hoping to get a list of
- filenames in that directory, only the name of the subdirectory
- itself will be displayed. You must add another backslash --
- i.e., "TYPE \SUBDIR\" -- in order to get a list of filenames.
-
- On color monitors, this program may sometimes produce a small
- amount of "snow." While it is possible to program around this, I
- don't usually have access to a color system. Hopefully this will
- be fixed in a later version.
-
-
-
- THE AUTHOR
- ----------
-
- Mike Morearty is currently (through June 1988) a senior at UC
- Berkeley, getting his bachelor's degree in Computer Science. He
- can be reached at:
-
- 83 Corte Mesa Drive
- San Rafael, CA 94901
-
- Electronic address:
-
- morearty@cory.Berkeley.EDU (or ucbvax!cory!morearty)